Skip to content

fix: Allow peer deployment requests across origins - #220

Merged
nfebe merged 2 commits into
mainfrom
fix/peer-deployment-cors
Aug 24, 2026
Merged

fix: Allow peer deployment requests across origins#220
nfebe merged 2 commits into
mainfrom
fix/peer-deployment-cors

Conversation

@nfebe

@nfebe nfebe commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Allow peer deployment detail requests to pass browser CORS preflight.

@sourceant

sourceant Bot commented Aug 24, 2026

Copy link
Copy Markdown

Code Review Summary

This PR addresses CORS preflight failures for peer deployment requests by whitelisting the custom X-FlatRun-Deployment header. It also introduces a unit test to ensure this configuration remains functional.

🚀 Key Improvements

  • Whitelisted X-FlatRun-Deployment in the API's CORS configuration to support cross-origin peer requests.
  • Added internal/api/cors_test.go to validate that the CORS middleware correctly handles preflight requests containing the new custom header.

💡 Minor Suggestions

  • Use a constant for the custom header name to ensure consistency between the configuration and the handlers that consume it.

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. No specific code suggestions were generated. See the overview comment for a summary.

@nfebe
nfebe merged commit adf2e57 into main Aug 24, 2026
6 checks passed
@nfebe
nfebe deleted the fix/peer-deployment-cors branch August 24, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant